package com.mobile.service;

import java.util.ArrayList;
import java.util.List;

import org.dozer.DozerBeanMapper;
import org.springframework.beans.factory.annotation.Autowired;

public class MobileService {

	@Autowired protected DozerBeanMapper dozerMapper;
	@Autowired protected DozerBeanMapper dozerMapperFull;
	
	public <O,D> List<O> converterListDominioEmListOTD(List<D> listDominio, Class<O> clazz){
		List<O> listaOTD = new ArrayList<O>();
		
		for (Object dominio : listDominio) 
			listaOTD.add(dozerMapper.map(dominio, clazz));
		
		return listaOTD;
	}
}
